<?php @session_start();?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<!--加载js文件-->
<script src="https://cdn.bootcss.com/vue/2.5.17-beta.0/vue.js"></script>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>

<!--加载css和js文件-->
<link href="https://cdn.bootcss.com/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.bootcss.com/twitter-bootstrap/3.3.7/css/bootstrap-theme.min.css" rel="stylesheet">
<!--
<script src="https://cdn.bootcss.com/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
-->
<link href="https://cdn.bootcss.com/bootstrap-select/2.0.0-beta1/css/bootstrap-select.min.css" rel="stylesheet">
<!--
<script src="https://cdn.bootcss.com/bootstrap-select/2.0.0-beta1/js/bootstrap-select.min.js"></script>
-->

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<!--
<script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.js"></script>
<script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
-->
<![endif]-->

<!--自定义模态对话框-->
<link rel=stylesheet href='../../common-static/modal-dlg.css' type='text/css'>
<script src="../../common-static/modal-component.js"></script>

<!--公用函数-->
<script src="../../common-static/cookie-utils.js"></script>
<script src="../../common-static/base-utils.js"></script>
<script src="../../common-static/base64.js"></script>
<!--解决中文乱码问题,原版本中文会出现乱码-->
<script src="../../common-static/base64-new.js"></script>

<!--自定义样式-->
<link rel=stylesheet href='../../common-static/zz-style.css' type='text/css'>

<!--自定义样式-->
<link rel=stylesheet href='../../common-static/zz-style.css' type='text/css'>

<script>
    var b = getBrowser()
    if ( b!= 'chrome') {
        window.location.href="../../common-static/browser_down.html"
    }
</script>

<script>
    $("document").ready(function (){
        $("form").append("<div id='csrf' />");
        //$("#csrf").load("../model/csrf_load.php");
    });
</script>
<?php
$roleArray = array();
array_push($roleArray, 'administrator', 'teacher',
    'jgadmin', 'xxadmin',
    'problem_editor', 'problem_checker');
foreach ( $roleArray as $role ) {
    if ( isset($_SESSION[$role]) ) {
        $isAllowAccess = true;
        break;
    }
}

if ( !$isAllowAccess ) {
    echo "<a href='../../loginpage.php'>你还未登录，请先登录!</a>";
    exit(1);
}
?>

